<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.qifan.alb2b.domain.CountryInfoDomain"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>易能旅游网站--用户信息修改</title>
	<%@ include file="/pages/common/common_f.jsp" %>	
	<link rel="stylesheet" type="text/css" href="${ctx}/css/register.css" />
	<script type="text/javascript">
		$(function(){
			$('#userCall').combobox('setValue','${user.userCall}');
		});
	
		/** 更新 */
		function updateUser(){
			var r = $('#userForm').form('validate'); 
			if(!r) {
				return false;
			}
			url="${ctx}/userCenter/update.usr";
			$.post(url,$("#userForm").serializeArray(),function(data){
				if(data.success){//操作成功
					$.messager.alert('提示','操作成功','info');
				}else{
					$.messager.alert('提示',data.msg,'warning');	
				}
			});
		}

	</script>	
  </head>
 <body style="margin:0;padding:0;height:100%;overflow:scroll;background:#F2FBFF">
  	<div class="main">
		<jsp:include page="/pages/front/inc/header.jsp"></jsp:include><!-- 顶部导航 -->
		<div class="info">
			<span class="location"><span style="font-weight: bold;">位置：</span>首页>用户中心>信息修改</span>
			<span class="user"><jsp:include page="/pages/front/inc/login_info.jsp"/></span>
		</div>
		<div class="content">
			<div class="left">
				<jsp:include page="/pages/front/user/left_model.jsp"></jsp:include>
			</div>
			<div class="right" id="right">
  <form class="auform" id="userForm" method="post">
  <div id="register_div" style="margin: 5px;width: 730px;">
  	<h2>用户信息修改</h2>
	<div class="demo-info">
		<div class="demo-tip icon-tip"></div>
		<div>注意事项：请仔细填写公司信息和个人信息，保证公司信息和个人真实有效。</div>
	</div>
	<div class="info_div">
		<div class="info_title">公司信息</div>
		<div class="info_content">
		<c:set var="user" value="${user}" />
		<c:set var="comp" value="${comp}" />
			<table>
				<tr>
				<td class="autd1">国   家：</td>
				<td class="autd2"><input name="country" value="${comp.country }" class="easyui-validatebox txt" validType="length[0,30]" class="txt" style="width:150px;" ></td>
			<td class="autd1">省   份：</td>
				<td class="autd2"><input name="province" value="${comp.province }" class="easyui-validatebox txt" validType="length[0,20]" class="txt" style="width:150px;"></td>
			<td class="autd1">城   市：</td>
				<td class="autd2"><input name="city" value="${comp.city }" class="easyui-validatebox txt" validType="length[0,20]" style="width:150px;"></td>
			
			</tr>
				<tr>
				<td class="autd1">公司名：</td>
				<td class="autd2"><input name="compName" value="${comp.compName }" disabled class="easyui-validatebox txt" validType="length[2,50]" style="width:150px;" required="true"><span class="red">*</span></td>
				<td class="autd1">公司电话：</td>
				<td class="autd2"><input name="compTel" id="compTel"  value="${comp.compTel }" class="easyui-validatebox txt"  validType="length[0,20]" style="width:150px;"></td>
				<td class="autd1">街  道：</td>
				<td class="autd2"><input name="street" id="street" value="${comp.street }"  class="easyui-validatebox txt" validType="length[0,100]" class="txt" style="width:150px;" /></td>
				
				</tr>
				
				<tr>
				<td class="autd1">公司传真：</td>
				<td class="autd2"><input name="compFax" value=""${comp.compFax }"  class="easyui-validatebox txt" validType="length[2,50]" style="width:150px;" ></td>
				<td class="autd1">注册时间：</td>
				<td class="autd2"><input name="createTime" id="createTime"  value="${comp.createTime }" disabled class="easyui-validatebox txt"  validType="length[0,20]" style="width:150px;"></td>
				<td class="autd1">付款期限（天）</td>
				<td class="autd2"><input name="payTime" id="payTime" value="${comp.payTime }"  disabled class="easyui-validatebox txt" validType="length[0,100]" class="txt" style="width:150px;" /></td>
				
				</tr>
				<tr>
				<td class="autd1">信用额度：</td>
				<td class="autd2"><input name="creditLimit" value="${comp.creditLimit }" disabled class="easyui-validatebox txt" validType="length[2,50]" style="width:150px;"></td>
				<td class="autd1">已用额度：</td>
				<td class="autd2"><input name="creditUsed" id="creditUsed"  value="${comp.creditUsed }" disabled  class="easyui-validatebox txt"  validType="length[0,20]" style="width:150px;"></td>
				<td class="autd1">公司积分：</td>
				<td class="autd2"><input name="integral" id="integral" value="${comp.integral }"  disabled class="easyui-validatebox txt" validType="length[0,100]" class="txt" style="width:150px;" /></td>
				
				</tr>
				<tr>
				<td class="autd1">交易订单数：</td>
				<td class="autd2"><input name="orderCount" value="${comp.orderCount }" disabled class="easyui-validatebox txt" validType="length[2,50]" style="width:150px;" required="true"></td>
				<td class="autd1">交易总额：</td>
				<td class="autd2"><input name="orderAmount" id="orderAmount"  value="${comp.orderAmount }" disabled class="easyui-validatebox txt"  validType="length[0,20]" style="width:150px;"></td>
				<td class="autd1">&nbsp;</td>
				<td class="autd2">&nbsp;</td>
				
				</tr>
			</table>
		</div>
	</div>
	<div class="info_div">
		<div class="info_title">个人信息</div>
		<div class="info_content">
			<table>
				<tr>
				<td class="autd1">用户名：</td>
				<td class="autd2"><input name="userName" value="${user.userName }" disabled  style="width:150px" validType="length[2,30]" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">&nbsp;</td>
				<td class="autd2">&nbsp;</td>
				<td class="autd1">&nbsp;</td>
				<td class="autd2">&nbsp;</td>
				</tr>
				<tr>
					<td class="autd1">真名：</td>
				<td class="autd2"><input name="trueName" value="${user.trueName }" style="width:150px" validType="length[0,10]" class="easyui-validatebox txt" ></td>
					<td class="autd1">称呼：</td>
				<td>
					<select class="easyui-combobox" name="userCall" id="userCall" panelHeight="auto" style="width:150px;" required="true" editable="false">
						<option value="-1">请选择</option>
						<option value="0">先生</option>
						<option value="1">小姐</option>
					</select><span class="red">*</span>
				</td>
				<td class="autd1">生日：</td>
				<td class="autd2"><input name="userBirth"  value="${user.userBirth }" required="true" style="width: 150px;" class="Wdate txt" onClick="WdatePicker()"></td>
				</tr>
				<tr>
					
					<td class="autd1">手机：</td>
				<td class="autd2"><input name="mobile" value="${user.mobile }" style="width:150px;" validType="mobile" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">邮箱：</td>
				<td class="autd2"><input name="email" value="${user.email }" style="width:150px;" validType="email" class="easyui-validatebox txt" required="true"><span class="red">*</span></td>
				<td class="autd1">邮编：</td>
				<td class="autd2"><input name="userPost" value="${user.userPost}" style="width:150px;" validType="zip" class="easyui-validatebox txt"></td>
				</tr>
				<tr>
				
				<td class="autd1">QQ：</td>
				<td class="autd2"><input name="qq" value="${user.qq}" style="width:150px;" validType="number" class="easyui-validatebox txt"></td>
				
				<td class="autd1">SKYPE：</td>
				<td class="autd2"><input name="skype" value="${user.msn}" style="width:150px;" validType="length[0,15]" class="easyui-validatebox txt"></td>
				<td class="autd1">MSN：</td>
				<td class="autd2"><input name="msn" value="${user.msn}" style="width:150px;" validType="length[0,15]" class="easyui-validatebox txt"></td>
				</tr>
				<tr>
				<td class="autd1">地址：</td>
				<td class="autd2" ><input name="address" value="${user.address}" width=20 id="address" validType="length[0,100]" class="txt" type="text" style="width:150px;" editable="false"/></td>
				<td class="autd1">公司积分：</td>
				<td class="autd2"><input name="integral" id="integral" value="${user.integral }"  disabled class="easyui-validatebox txt" validType="length[0,100]" class="txt" style="width:150px;" /></td>
				</tr>
				<tr>
				<td class="autd1">交易订单数：</td>
				<td class="autd2"><input name="orderCount" value="${user.orderCount }" disabled class="easyui-validatebox txt" validType="length[2,50]" style="width:150px;" required="true"></td>
				<td class="autd1">交易总额：</td>
				<td class="autd2"><input name="orderAmount" id="orderAmount"  value="${user.orderAmount }" disabled class="easyui-validatebox txt"  validType="length[0,20]" style="width:150px;"></td>
				<td class="autd1">&nbsp;</td>
				<td class="autd2">&nbsp;</td>
				
				</tr>
			</table>
		</div>
	</div>
	
	<div class="btn_div">
		<a href="#" id="btn-add"
							onclick="clearReg();"
							class="easyui-linkbutton" iconCls="icon-cancel">重填</a>&nbsp;
		<a href="#" id="btn-add"
							onclick="updateUser();"
							class="easyui-linkbutton" iconCls="icon-save">修改</a>
	</div>
</div>
</form>
</div><!-- end right -->
			<div class="vertical-border"></div><!-- center border-line -->
		</div><!-- end content -->
	</div><!-- end main -->
	

</body>

</html>